<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            background-color: black;
        }

        .box {
            width: 300px;
            height: 300px;
            display: flex;
            justify-content: center;
        }

        .match{
            position: relative;
            top: 50px;
            animation: match 5s infinite ease-in;
        }

        .head {
            width: 40px;
            height: 40px;
            border: 5px solid #fff;
            border-radius: 50%;
            animation: head 2s infinite alternate;
        }

        .torso{
            width: 5px;
            height: 70px;
            background-color: #fff;
            position: absolute;
            top: 40px;
            left: 7px;
        }
        .same{
            width: 35px;
            height: 45px;
            transform-origin: 0% 0% 0px;
        }

        .same.arm{
            border-left: 5px solid #fff;
            border-bottom: 5px solid #fff;
            position: absolute;
            top: 40px;
            left: 7px;
            animation: arm 1s infinite ease-in-out;
            
        }
        .same.arm.left{
            transform: rotate3d(0,0,1,55deg);
        }
        .same.arm.right{
            transform: rotate3d(0,0,1,-50deg);
            animation-delay: 0.5s;
        }

        .same.leg{
            border-right: 5px solid #fff;
            border-top: 5px solid #fff;
            position: absolute;
            top: 105px;
            left: 10px;
            animation: leg 1s infinite ease-in;
        }
        .same.leg.left{
           transform: rotate3d(0,0,1,120deg);
           animation-delay: 0.5s;
        }
        .same.leg.right{
           transform: rotate3d(0,0,1,-5deg);
        }
        @keyframes head {
            0%{
                transform: rotate3d(0,0,1,5deg);
            }
            25%{
                transform: rotate3d(0,0,1,-30deg) skew(15deg,0deg);
            }
            50%{
                transform: rotate3d(0,0,1,5deg);
            }
            75%{
                transform: rotate3d(0,0,1,-30deg) skew(15deg,0deg);
            }
            100%{
                transform: rotate3d(0,0,1,20deg) skew(-15deg,0deg);
            }

        }
        @keyframes arm {
            0% {
                transform: rotate3d(0,0,1,55deg);
            }
            50% {
                transform: rotate3d(0,0,1,-50deg);
            }
            100% {
                transform: rotate3d(0,0,1,55deg);
            }
        }

        @keyframes leg {
            0% {
                transform: rotate3d(0,0,1,120deg);
            }
            50% {
                transform: rotate3d(0,0,1,-5deg);
            }
            100% {
                transform: rotate3d(0,0,1,120deg);
            }
        }

        @keyframes match{
            0%{
                transform: translateX(-200px);
            }
            100%{
                transform: translateX(2000px);

            }
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="match">
            <div class="head"></div>
            <div class="same arm left"></div>
            <div class="same arm right"></div>
            <div class="torso"></div>
            <div class="same leg left"></div>
            <div class="same leg right"></div>
        </div>
    </div>
</body>

</html>